package com.heima.test;

public class maopao {
	public static void main(String[] args) {
		int[] array1;
		array1=new int[] {55,89,654,6,489,-8,-4894,-78};
		for(int i=0;i < array1.length-1;i++) {
			for(int j=0 ;j<array1.length-1-i; j++) {
				if(array1[j]>array1[j+1]) {
				int temp=array1[j];
				array1[j]=array1[j+1];
				array1[j+1]=temp;
				}
			}
		}for(int k=0;k<array1.length;k++) {
			System.out.print(array1[k]+"\t");
		}
	}
}